
<div th:fragment="qyxxgl-modal"><!-- 签约信息概览-相关弹窗模型 -->
<meta charset="UTF-8" />
<meta http-equiv="pragma" content="no-cache"></meta>
<meta http-equiv="cache-control" content="no-cache"></meta>
<meta http-equiv="expires" content="0"></meta>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<script type="text/javascript">

   /* 已签约Table */
   function openYqyModel(layero){
	   $(layero).find("#yqyTable").datagrid({
			idField : "USERID",
			fit:true,
			fitColumns: true,
			scrollbarSize:0, //预留的滚动条的宽度
			singleSelect:true,
			columns:[[
		   				{field:'XM', title:'姓名', width: 100, align: 'center'}
						,{field:'ZJHM', title:'证件号码', width: 120, align: 'center',formatter:function(value){
							var reg = /.{8}$/;
							return value.replace(reg,'********');
						}}
						,{field:'SJHM', title:'手机号码', width: 100, align: 'center'}
						,{field:'JTZZ', title:'家庭住址', width: 200, align: 'left',formatter:function(value){
							return '<span title="'+value+'">'+value+'</span>';
						}}
						,{field:'QYSJ', title:'签约时间', width: 90, align: 'center'}
						,{field:'RQFLMC', title:'人群分类', width: 100, align: 'center',formatter:function(value,row,index){
							if(StringUtils.isEmpty(value)) value = '普通';
							return '<span title="'+value+'">'+value+'</span>';
						}}
						,{field:'QYTDMC', title:'签约团队', width: 110, align: 'center',formatter:function(value){
							return '<span title="'+value+'">'+value+'</span>';
						}}
						,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row,index){
							return '<span style="font-weight: bold;color: blue;cursor:pointer;">详细</span>';
						}}
			]],
			pagination : true,
			pageNumber : 1,
			pageSize : 10,
			pageList: [10, 25, 50, 100, 200],
			scrollBarSize:0,
			url:contextRoot + 'gzt/queryYqyjmDataByPage.service',
			onBeforeLoad : function(params) {
				params.QYSJ_start = startTime;
				params.QYSJ_end = endTime;
				params.USERID = parent.userInfo.USERID;
				params.YLTDID = $("#tdxxList>option:selected").data("TDID");
				return params;
			},
			onLoadSuccess: function(data){
// 				alert(JSON.stringify(data))
			}
			
	  })
   }
   
   /* 已预约Table */
   function openYyyModel(layero){
	   $(layero).find("#yyyTable").datagrid({
			idField : "USERID",
			fit:true,
			fitColumns: true,
			scrollbarSize:0, //预留的滚动条的宽度
			singleSelect:true,
			columns:[[
		   				{field:'XM', title:'姓名', width: 100, align: 'center'}
						,{field:'ZJHM', title:'证件号码', width: 200, align: 'center',formatter:function(value){
							var reg = /.{8}$/;
							return value.replace(reg,'********');
						}}
						,{field:'SJHM', title:'手机号码', width: 100, align: 'center'}
						,{field:'JZRQ', title:'就诊日期', width: 200, align: 'center'}
						,{field:'ZDBM', title:'诊断编码', width: 100, align: 'center'}
						,{field:'TDMC', title:'诊断名称', width: 100, align: 'center'}
						,{field:'YYRQ', title:'预约日期', width: 100, align: 'center'}
						,{field:'YYYYMC', title:'预约医院', width: 100, align: 'center'}
						,{field:'YYKSMC', title:'预约科室', width: 100, align: 'center'}
						,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row,index){
							return '<span style="font-weight: bold;color: blue;cursor:pointer;">详细</span>';
						}}
			]],
			pagination : true,
			pageNumber : 1,
			pageSize : 10,
			pageList: [10, 25, 50, 100, 200],
			scrollBarSize:0,
			url:contextRoot + 'gzt/queryYyyjmDataByPage.service',
			onBeforeLoad : function(params) {
				params.JZRQ_start = startTime;
				params.JZRQ_end = endTime;
				params.SSTDID = $("#tdxxList>option:selected").data("TDID");
				return params;
			},
			onLoadSuccess: function(data){
// 				alert(JSON.stringify(data))
			}
			
	  })
   }
   
   /* 已转诊Table */
   function openYzzModel(layero){
	   $(layero).find("#yzzTable").datagrid({
			idField : "USERID",
			fit:true,
			fitColumns: true,
			scrollbarSize:0, //预留的滚动条的宽度
			singleSelect:true,
			columns:[[
		   				{field:'XM', title:'姓名', width: 100, align: 'center'}
						,{field:'ZJHM', title:'证件号码', width: 200, align: 'center',formatter:function(value){
							var reg = /.{8}$/;
							return value.replace(reg,'********');
						}}
						,{field:'SJHM', title:'手机号码', width: 100, align: 'center'}
						,{field:'JTZZ', title:'就诊日期', width: 200, align: 'center'}
						,{field:'ZDBM', title:'诊断编码', width: 100, align: 'center'}
						,{field:'ZDMC', title:'诊断名称', width: 100, align: 'center'}
						,{field:'YYZZRQ', title:'预约转诊日期', width: 100, align: 'center'}
						,{field:'ZZLX', title:'转诊类型', width: 100, align: 'center',formatter:function(value,row,index){
							var zzlxObj = {"1":"门诊转诊","2":"住院转诊"};
							return zzlxObj[value];
						}}
						,{field:'ZZYYMC', title:'转诊医院', width: 100, align: 'center'}
						,{field:'ZZKSMC', title:'转诊科室', width: 100, align: 'center'}
						,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row,index){
							return '<span style="font-weight: bold;color: blue;cursor:pointer;">详细</span>';
						}}
			]],
			pagination : true,
			pageNumber : 1,
			pageSize : 10,
			pageList: [10, 25, 50, 100, 200],
			scrollBarSize:0,
			url:contextRoot + 'gzt/queryYzzjmDataByPage.service',
			onBeforeLoad : function(params) {
				params.JZRQ_start = startTime;
				params.JZRQ_end = endTime;
				params.SSTDID = $("#tdxxList>option:selected").data("TDID");
				return params;
			},
			onLoadSuccess: function(data){
// 				alert(JSON.stringify(data))
			}
			
	  })
   }
   
   /* 已履约Table */
   function openYlyModel(layero){
	   $(layero).find("#ylyTable").datagrid({
			idField : "USERID",
			fit:true,
			fitColumns: true,
			scrollbarSize:0, //预留的滚动条的宽度
			singleSelect:true,
			columns:[[
		   				{field:'XM', title:'姓名', width: 100, align: 'center'}
						,{field:'ZJHM', title:'证件号码', width: 200, align: 'center',formatter:function(value){
							var reg = /.{8}$/;
							return value.replace(reg,'********');
						}}
						,{field:'SJHM', title:'手机号码', width: 100, align: 'center'}
						,{field:'ZDBM', title:'诊断编码', width: 100, align: 'center'}
						,{field:'ZDMC', title:'诊断名称', width: 100, align: 'center'}
						,{field:'YYRQ', title:'预约/转诊日期', width: 100, align: 'center',formatter:function(value,row,index){
							return value || row.JZRQ;
						}}
						,{field:'YYYYMC', title:'预约/转诊医院', width: 100, align: 'center',formatter:function(value,row,index){
							return value || row.ZZYYMC;
						}}
						,{field:'YYKSMC', title:'预约/转诊科室', width: 100, align: 'center',formatter:function(value,row,index){
							return value || row.ZZKSMC;
						}}
						,{field:'ZZLX', title:'履约类型', width: 100, align: 'center',formatter:function(value,row,index){
							var zzlxObj = {"1":"门诊转诊","2":"住院转诊"};
							return zzlxObj[value] || '门诊预约';
						}}
						,{field:'JZRQ', title:'履约日期', width: 100, align: 'center'}
						,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row,index){
							return '<span style="font-weight: bold;color: blue;cursor:pointer;">详细</span>';
						}}
			]],
			pagination : true,
			pageNumber : 1,
			pageSize : 10,
			pageList: [10, 25, 50, 100, 200],
			scrollBarSize:0,
			url:contextRoot + 'gzt/queryYlyjmDataByPage.service',
			onBeforeLoad : function(params) {
				params.JZRQ_start = startTime;
				params.JZRQ_end = endTime;
				params.SSTDID = $("#tdxxList>option:selected").data("TDID");
				return params;
			},
			onLoadSuccess: function(data){
// 				alert(JSON.stringify(data))
			}
			
	  })
   }
   
   /* 有效签约Table */
   function openYxqyModel(layero){
	   $(layero).find("#yxqyTable").datagrid({
			idField : "USERID",
			fit:true,
			fitColumns: true,
			scrollbarSize:0, //预留的滚动条的宽度
			singleSelect:true,
			columns:[[
		   				{field:'XM', title:'姓名', width: 100, align: 'center'}
						,{field:'ZJHM', title:'证件号码', width: 120, align: 'center',formatter:function(value){
							var reg = /.{8}$/;
							return value.replace(reg,'********');
						}}
						,{field:'SJHM', title:'手机号码', width: 100, align: 'center'}
						,{field:'JTZZ', title:'家庭住址', width: 200, align: 'left',formatter:function(value){
							return '<span title="'+value+'">'+value+'</span>';
						}}
						,{field:'QYSJ', title:'签约时间', width: 90, align: 'center'}
						,{field:'RQFLMC', title:'有效人群分类', width: 110, align: 'center',formatter:function(value){
							return '<span title="'+value+'">'+value+'</span>';
						}}
						,{field:'QYTDMC', title:'签约团队', width: 100, align: 'center',formatter:function(value){
							return '<span title="'+value+'">'+value+'</span>';
						}}
						,{field:'cz', title:'操作', width: 100, align: 'center',formatter:function(value,row,index){
							row = JSON.stringify(row).replace(/"/g, '&quot;'); 
							var btn = $("<span>").html("test").on("click",function(){
								alert()
							})
							//return '<span style="font-weight: bold;color: blue;cursor:pointer;" onclick="detailMsg(value)">详细</span>';
							return btn.prop("outerHTML");
						}}
			]],
			pagination : true,
			pageNumber : 1,
			pageSize : 10,
			pageList: [10, 25, 50, 100, 200],
			scrollBarSize:0,
			url:contextRoot + 'gzt/queryYxqyjmDataByPage.service',
			onBeforeLoad : function(params) {
				params.QYSJ_start = startTime;
				params.QYSJ_end = endTime;
				params.USERID = parent.userInfo.USERID;
				params.YLTDID = $("#tdxxList>option:selected").data("TDID");
			},
			onLoadSuccess: function(data){
// 				alert(JSON.stringify(data))
			}
			
	  })
   }

   /** 查看详细  */
   function detailMsg(value) {
	   	StoreCache.setCache("BACKINFO", "index.html");
	   	StoreCache.setCache("JTQYXQINFO", value);
	   	location = "detail.html?to=detail&JMXXID=" + value.JMXXID;
   }
</script>
<!-- 已签约model -->
<script type="text/html" id="yqyModel">
	<div class="easyui-layout" fit="true">
		<div region="center" style="height:457px;">
			<table id="yqyTable" border="false"></table>
		</div>
	</div>
</script>

<!-- 已预约model -->
<script type="text/html" id="yyyModel">
	<div class="easyui-layout" fit="true">
		<div region="center" style="height:457px;">
			<table id="yyyTable" border="false"></table>
		</div>
	</div>
</script>

<!-- 已转诊model -->
<script type="text/html" id="yzzModel">
	<div class="easyui-layout" fit="true">
		<div region="center" style="height:457px;">
			<table id="yzzTable" border="false"></table>
		</div>
	</div>
</script>

<!-- 已履约model -->
<script type="text/html" id="ylyModel">
	<div class="easyui-layout" fit="true">
		<div region="center" style="height:457px;">
			<table id="ylyTable" border="false"></table>
		</div>
	</div>
</script>

<!-- 有效签约model -->
<script type="text/html" id="yxqyModel">
	<div class="easyui-layout" fit="true">
		<div region="center" style="height:457px;">
			<table id="yxqyTable" border="false"></table>
		</div>
	</div>
</script>
</div>